Description: Generate a formatted string in Java. Syntax: format (s,…) Note: The function converts data of any type intoformatted string